﻿using System.Security.Cryptography;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using SuppKids.Core.Security;

namespace SuppKids.IoC.Installers
{
	public class SecurityInstaller : IWindsorInstaller
	{
		public void Install(IWindsorContainer container, IConfigurationStore store)
		{
			container.Register(Component.For<LicenseStorage>().ImplementedBy<LicenseStorage>().LifeStyle.Singleton);
			container.Register(Component.For<RSACryptoServiceProvider>().ImplementedBy<RSACryptoServiceProvider>().LifeStyle.Singleton);
			container.Register(Component.For<XmlRsaManager>().ImplementedBy<XmlRsaManager>().LifeStyle.Singleton);
			container.Register(Component.For<LicensesManager>().ImplementedBy<LicensesManager>().LifeStyle.Singleton);
		}
	}
}
